3.166 \(\int \frac{(a+b \log (c x^n))^2 (d+e \log (f x^r))}{x} \, dx\)

Optimal. Leaf size=57 \[ \frac{\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac{e r \left (a+b \log \left (c x^n\right )\right )^4}{12 b^2 n^2} \]

[Out]

-(e*r*(a + b*Log[c*x^n])^4)/(12*b^2*n^2) + ((a + b*Log[c*x^n])^3*(d + e*Log[f*x^r]))/(3*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.095202, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2302, 30, 2366, 12} \[ \frac{\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac{e r \left (a+b \log \left (c x^n\right )\right )^4}{12 b^2 n^2} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x,x]

[Out]

-(e*r*(a + b*Log[c*x^n])^4)/(12*b^2*n^2) + ((a + b*Log[c*x^n])^3*(d + e*Log[f*x^r]))/(3*b*n)

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x} \, dx &=\frac{\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-(e r) \int \frac{\left (a+b \log \left (c x^n\right )\right )^3}{3 b n x} \, dx\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac{(e r) \int \frac{\left (a+b \log \left (c x^n\right )\right )^3}{x} \, dx}{3 b n}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac{(e r) \operatorname{Subst}\left (\int x^3 \, dx,x,a+b \log \left (c x^n\right )\right )}{3 b^2 n^2}\\ &=-\frac{e r \left (a+b \log \left (c x^n\right )\right )^4}{12 b^2 n^2}+\frac{\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}\\ \end{align*}

Mathematica [B]  time = 0.133115, size = 129, normalized size = 2.26 \[ \frac{1}{12} \log (x) \left (4 b n \log ^2(x) \left (2 a e r+2 b e r \log \left (c x^n\right )+b d n+b e n \log \left (f x^r\right )\right )-6 \log (x) \left (a+b \log \left (c x^n\right )\right ) \left (a e r+b e r \log \left (c x^n\right )+2 b d n+2 b e n \log \left (f x^r\right )\right )+12 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )-3 b^2 e n^2 r \log ^3(x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x,x]

[Out]

(Log[x]*(-3*b^2*e*n^2*r*Log[x]^3 + 12*(a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]) + 4*b*n*Log[x]^2*(b*d*n + 2*a*e*
r + 2*b*e*r*Log[c*x^n] + b*e*n*Log[f*x^r]) - 6*Log[x]*(a + b*Log[c*x^n])*(2*b*d*n + a*e*r + b*e*r*Log[c*x^n] +
 2*b*e*n*Log[f*x^r])))/12

________________________________________________________________________________________

Maple [C]  time = 0.886, size = 9164, normalized size = 160.8 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*(d+e*ln(f*x^r))/x,x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [B]  time = 1.19987, size = 220, normalized size = 3.86 \begin{align*} \frac{b^{2} e \log \left (c x^{n}\right )^{2} \log \left (f x^{r}\right )^{2}}{2 \, r} + \frac{b^{2} d \log \left (c x^{n}\right )^{3}}{3 \, n} + \frac{a b e \log \left (c x^{n}\right ) \log \left (f x^{r}\right )^{2}}{r} - \frac{a b e n \log \left (f x^{r}\right )^{3}}{3 \, r^{2}} - \frac{1}{12} \,{\left (\frac{4 \, n \log \left (c x^{n}\right ) \log \left (f x^{r}\right )^{3}}{r^{2}} - \frac{n^{2} \log \left (f x^{r}\right )^{4}}{r^{3}}\right )} b^{2} e + \frac{a b d \log \left (c x^{n}\right )^{2}}{n} + \frac{a^{2} e \log \left (f x^{r}\right )^{2}}{2 \, r} + a^{2} d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x,x, algorithm="maxima")

[Out]

1/2*b^2*e*log(c*x^n)^2*log(f*x^r)^2/r + 1/3*b^2*d*log(c*x^n)^3/n + a*b*e*log(c*x^n)*log(f*x^r)^2/r - 1/3*a*b*e
*n*log(f*x^r)^3/r^2 - 1/12*(4*n*log(c*x^n)*log(f*x^r)^3/r^2 - n^2*log(f*x^r)^4/r^3)*b^2*e + a*b*d*log(c*x^n)^2
/n + 1/2*a^2*e*log(f*x^r)^2/r + a^2*d*log(x)

________________________________________________________________________________________

Fricas [B]  time = 0.882675, size = 451, normalized size = 7.91 \begin{align*} \frac{1}{4} \, b^{2} e n^{2} r \log \left (x\right )^{4} + \frac{1}{3} \,{\left (2 \, b^{2} e n r \log \left (c\right ) + b^{2} e n^{2} \log \left (f\right ) + b^{2} d n^{2} + 2 \, a b e n r\right )} \log \left (x\right )^{3} + \frac{1}{2} \,{\left (b^{2} e r \log \left (c\right )^{2} + 2 \, a b d n + a^{2} e r + 2 \,{\left (b^{2} d n + a b e r\right )} \log \left (c\right ) + 2 \,{\left (b^{2} e n \log \left (c\right ) + a b e n\right )} \log \left (f\right )\right )} \log \left (x\right )^{2} +{\left (b^{2} d \log \left (c\right )^{2} + 2 \, a b d \log \left (c\right ) + a^{2} d +{\left (b^{2} e \log \left (c\right )^{2} + 2 \, a b e \log \left (c\right ) + a^{2} e\right )} \log \left (f\right )\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x,x, algorithm="fricas")

[Out]

1/4*b^2*e*n^2*r*log(x)^4 + 1/3*(2*b^2*e*n*r*log(c) + b^2*e*n^2*log(f) + b^2*d*n^2 + 2*a*b*e*n*r)*log(x)^3 + 1/
2*(b^2*e*r*log(c)^2 + 2*a*b*d*n + a^2*e*r + 2*(b^2*d*n + a*b*e*r)*log(c) + 2*(b^2*e*n*log(c) + a*b*e*n)*log(f)
)*log(x)^2 + (b^2*d*log(c)^2 + 2*a*b*d*log(c) + a^2*d + (b^2*e*log(c)^2 + 2*a*b*e*log(c) + a^2*e)*log(f))*log(
x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c x^{n} \right )}\right )^{2} \left (d + e \log{\left (f x^{r} \right )}\right )}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*(d+e*ln(f*x**r))/x,x)

[Out]

Integral((a + b*log(c*x**n))**2*(d + e*log(f*x**r))/x, x)

________________________________________________________________________________________

Giac [B]  time = 1.32799, size = 301, normalized size = 5.28 \begin{align*} \frac{1}{4} \, b^{2} n^{2} r e \log \left (x\right )^{4} + \frac{2}{3} \, b^{2} n r e \log \left (c\right ) \log \left (x\right )^{3} + \frac{1}{3} \, b^{2} n^{2} e \log \left (f\right ) \log \left (x\right )^{3} + \frac{1}{2} \, b^{2} r e \log \left (c\right )^{2} \log \left (x\right )^{2} + b^{2} n e \log \left (c\right ) \log \left (f\right ) \log \left (x\right )^{2} + \frac{1}{3} \, b^{2} d n^{2} \log \left (x\right )^{3} + \frac{2}{3} \, a b n r e \log \left (x\right )^{3} + b^{2} e \log \left (c\right )^{2} \log \left (f\right ) \log \left (x\right ) + b^{2} d n \log \left (c\right ) \log \left (x\right )^{2} + a b r e \log \left (c\right ) \log \left (x\right )^{2} + a b n e \log \left (f\right ) \log \left (x\right )^{2} + b^{2} d \log \left (c\right )^{2} \log \left (x\right ) + 2 \, a b e \log \left (c\right ) \log \left (f\right ) \log \left (x\right ) + a b d n \log \left (x\right )^{2} + \frac{1}{2} \, a^{2} r e \log \left (x\right )^{2} + 2 \, a b d \log \left (c\right ) \log \left (x\right ) + a^{2} e \log \left (f\right ) \log \left (x\right ) + a^{2} d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x,x, algorithm="giac")

[Out]

1/4*b^2*n^2*r*e*log(x)^4 + 2/3*b^2*n*r*e*log(c)*log(x)^3 + 1/3*b^2*n^2*e*log(f)*log(x)^3 + 1/2*b^2*r*e*log(c)^
2*log(x)^2 + b^2*n*e*log(c)*log(f)*log(x)^2 + 1/3*b^2*d*n^2*log(x)^3 + 2/3*a*b*n*r*e*log(x)^3 + b^2*e*log(c)^2
*log(f)*log(x) + b^2*d*n*log(c)*log(x)^2 + a*b*r*e*log(c)*log(x)^2 + a*b*n*e*log(f)*log(x)^2 + b^2*d*log(c)^2*
log(x) + 2*a*b*e*log(c)*log(f)*log(x) + a*b*d*n*log(x)^2 + 1/2*a^2*r*e*log(x)^2 + 2*a*b*d*log(c)*log(x) + a^2*
e*log(f)*log(x) + a^2*d*log(x)